package com.libui.thirdpartsdk.systemsdk

import android.content.Intent
import com.libui.thirdpartsdk.SDKInterface
import com.libui.thirdpartsdk.login.Login
import com.libui.thirdpartsdk.share.ShareInterface

internal class SystemSDK : SDKInterface {
    companion object {
        val builder = object : SDKInterface.Builder {
            override val type: String = "system"

            override val sdkVersion: String? = null

            override val loginBuilder: Login.Builder? = null

            override val shareBuilders: List<ShareInterface.Builder> = arrayListOf(
                SystemShare.builder,
                CopyShare.builder,
                BrowserShare.builder,
            )

            override fun build(): SDKInterface {
                return SystemSDK()
            }
        }
    }

    override val type: String
        get() = builder.type

    override val loginBuilder: Login.Builder?
        get() = builder.loginBuilder

    override val shareBuilders: List<ShareInterface.Builder>?
        get() = builder.shareBuilders

    override val isAppInstalled: Boolean = true

    override val sdkVersion: String? = null

    override fun install(): Boolean {
        return true
    }

    override fun uninstall() {
    }

    override fun handleIntent(intent: Intent): Boolean {
        return false
    }
}